using SqlSugar;

namespace HtERP.Data
{
    [SugarTable("Users")]
    public class User
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
        public Guid Id { get; set; }
        
        [SugarColumn(IsNullable = false, ColumnDataType = "NVARCHAR(50)")]
        public string Username { get; set; } = string.Empty;
        
        [SugarColumn(IsNullable = false, ColumnDataType = "NVARCHAR(255)")]
        public string PasswordHash { get; set; } = string.Empty;
        
        [SugarColumn(IsNullable = true, ColumnDataType = "NVARCHAR(100)")]
        public string Email { get; set; } = string.Empty;
        
        [SugarColumn(IsNullable = false, DefaultValue = "1")]
        public bool IsActive { get; set; }
        
        [SugarColumn(IsNullable = false)]
        public DateTime CreatedAt { get; set; }
        
        [SugarColumn(IsNullable = false)]
        public DateTime UpdatedAt { get; set; }
    }
}